package forcetower;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class CroupierTests {
	Croupier comp;
	
	@Before
	public void setUp () {
		comp = new Croupier("Croupier");
	}

	@Test
	public void inGameTest() {
		Carta a = new Carta(0,0,0);
		
		assertTrue (comp.getQuerCarta());
		assertEquals (0, comp.mostrarPontos());
		
		comp.receberCarta(a);
		comp.querCarta();
		assertEquals (11, comp.mostrarPontos());
		assertTrue (comp.getQuerCarta());
		
		a = new Carta(0, 12, 0);
		comp.receberCarta(a);
		comp.querCarta();
		
		assertEquals (21, comp.mostrarPontos());
		assertFalse (comp.getQuerCarta());
	}
	
	@Test
	public void funcionabilidadesTest() {
		comp.embaralharCartas();
		Carta a = comp.darCarta();
		
		assertNotNull (a);
		
		comp.mostrarCartasOrdenadas();
		comp.mostrarCartasOrdemSaida();
	}

}
